package com.fushenlan.epidemicControl.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fushenlan.commons.GeneralResponse;
import com.fushenlan.epidemicControl.dto.DetectionPersonalInfoRespDTO;
import com.fushenlan.epidemicControl.dto.NucleinDetectionApplyRecordRespDTO;
import com.fushenlan.epidemicControl.dto.NucleinDetectionResultRespDTO;
import com.fushenlan.epidemicControl.dto.request.NucleinDetectionApplyRecordReqDTO;
import com.fushenlan.po.NucleinDetectionApplyRecord;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author Administrator
 * @description 针对表【nuclein_detection_apply_record(核酸检测申请记录表)】的数据库操作Service
 * @createDate 2022-04-20 22:33:26
 */
public interface NucleinDetectionApplyRecordService extends IService<NucleinDetectionApplyRecord> {
    /**
     * 核酸检测申请记录查询
     *
     * @param startDate,endDate
     * @return
     */
    List<NucleinDetectionApplyRecordRespDTO> queryNucleinDetectionApplyRecord(@RequestParam("startDate") String startDate,
                                                                                               @RequestParam("endDate") String endDate);

    /**
     * 核酸检测申请-新增检测
     *
     * @param req
     * @return GeneralResponse
     */
    GeneralResponse insertNucleinDetectionApplyRecord(@RequestBody NucleinDetectionApplyRecordReqDTO req);
    /**
     * 核酸检测申请-查看核酸申请记录
     *
     * @param
     * @return GeneralResponse
     */
    GeneralResponse<NucleinDetectionApplyRecordRespDTO> LookNucleinDetectionApplyRecord( Long detectionId);

    void downloadNucleinDetectionApplyRecordModel(List<?> list, HttpServletResponse response);

    void downloadNucleinDetectionResultDetails(List<?> list, HttpServletResponse response);

    GeneralResponse<List<DetectionPersonalInfoRespDTO>> uploadNucleinDetectionApplyRecordList(MultipartFile multipartFile, HttpServletResponse response) throws Exception;

    GeneralResponse<List<DetectionPersonalInfoRespDTO>> uploadNucleinDetectionResultDetails(MultipartFile multipartFile, Long detectionId,HttpServletResponse response) throws Exception;

    GeneralResponse<List<DetectionPersonalInfoRespDTO>> querycloseContactInfo(Long userId, Long detectionId);
    /**
     * 查询核酸检测结果
     *
     * @param
     * @return List<NucleinDetectionResultRespDTO>
     */
    List<NucleinDetectionResultRespDTO> queryNucleinDetectionResult(@RequestParam("startDate") String startDate,
                                                                    @RequestParam("endDate") String endDate,
                                                                    @RequestParam("pageSize") Integer pageSize,
                                                                    @RequestParam("pageNo") Integer pageNo);
    /**
     * 通知登记接口
     * @param detectionId
     * @return int
     */
    int noticeRegister(Long detectionId);

    /**
     * 查询核酸检测结果详情查询
     * @param
     * @return List<DetectionPersonalInfoRespDTO>
     */
    GeneralResponse<IPage<DetectionPersonalInfoRespDTO>> queryNucleinDetectionResultDetails(@RequestParam(required = false,value = "community") Long community,
                                                                                            @RequestParam(required = false, value = "name") String name,
                                                                                            @RequestParam(required = false, value = "detectionResult") Integer detectionResult,
                                                                                            @RequestParam(required = false, value = "userStatus") Integer userStatus,
                                                                                            @RequestParam(required = false, value = "ifDetection") Integer ifDetection,
                                                                                            @RequestParam(required = false, value = "detectionId") Long detectionId,
                                                                                            @RequestParam("pageSize") Integer pageSize,
                                                                                            @RequestParam("pageNo") Integer pageNo);
    /**
     * 修改检测结果
     * @param
     * @return
     */
    int updateDetectionResult(Long userId, Long detectionId,Integer detectionResult);
    /**
     * 导出核酸查询结果详情
     * @param
     * @return
     */
    GeneralResponse exportNucleinDetectionResultDetails(
                                                         Long community,
                                                        String name,
                                                        Integer detectionResult,
                                                        Integer userStatus,
                                                        Integer ifDetection,
                                                        Long detectionId,
                                                         HttpServletResponse response);


}
